#!/usr/bin/python
# -*- coding:utf-8 -*-
# @time: 2021/7/5 2:00 下午

from django.urls import path
from .views import (
    ShutRebootView,
    LicenseView,
    SystemStatusView,
    UpdateView,
    SystemConfView,
    SupportView,
    PingView,
    NetworkInfoView,
    SnmpView,
    StatusBarView,
    SystemNtpView,
    DDiskUsageView,
    RouteView,
    SysNodeView,
    NodeUptimeView,
    NodeLastUpdateView,
    ChangeNodeView,
    UpdateLogView,
    BackupView,
    RecoveryView,
    ProgressView,
    BkRecoveryRecord,
    BkRecoveryFile,
    SshView,
)

urlpatterns = [
    # 系统状态 （负载 流量 时间 更新 管理 信息）
    path("status/", SystemStatusView.as_view()),  # 集群 负载可以复用 ?device_id=device_id
    path("network/", NetworkInfoView.as_view()),  # 集群 网口可以暂时不管 djconsole 暂未实现
    path("ntp/", SystemNtpView.as_view()),  # 集群
    path("update/", UpdateView.as_view()),
    path("manage/", ShutRebootView.as_view()),  # 集群支持
    path("license/", LicenseView.as_view()),
    path("ddisk/", DDiskUsageView.as_view()),  # 数据磁盘的最新占用率
    # 网络配置 （网口/DNS 模式 HA SNMP ...）
    path("config/", SystemConfView.as_view()),
    path("ping/", PingView.as_view()),
    # path("mode/", SystemModeView.as_view()),
    path("snmp/", SnmpView.as_view()),
    path("support/", SupportView.as_view()),  # 远程协助配置
    path("route/", RouteView.as_view()),  # 路由配置
    # 集群
    path("node/", SysNodeView.as_view()),  # 获取集群列表
    path("node/change/", ChangeNodeView.as_view()),
    path("node-uptime/", NodeUptimeView.as_view()),  # 节点的开机时间
    path("node-upat/", NodeLastUpdateView.as_view()),  # 节点的开机时间
    # 其他
    path("status_bar/", StatusBarView.as_view()),
    path("update_log/", UpdateLogView.as_view()),

    # 备份恢复
    path("backup-recovery/backup/", BackupView.as_view()),
    path("backup-recovery/recovery/", RecoveryView.as_view()),
    path("backup-recovery/progress/", ProgressView.as_view()),
    path("backup-recovery/record/", BkRecoveryRecord.as_view()),
    path("backup-recovery/file/", BkRecoveryFile.as_view()),

    # ssh
    path("ssh/", SshView.as_view()),
]
